<?php
namespace Common\Model;
use Think\Model;
/**
 * 自定义页面模型
 */
class PageModel extends Model{

    public function _del($ids){
        if ( empty($ids) ) {
            _apiReturn(0, "请设置删除数据ID");
        }
        $map = array($this->getPk() => array('in', $ids));
        $lists = $this->where($map)->select();
        if($this->where($map)->delete()){ //删除本地数据库中的row
            _apiReturn(1, "删除成功");
        } else {
            _apiReturn(0, "删除失败",$this->_sql());
        }
    }
}